from selenium import webdriver
from selenium.webdriver.chrome.service import Service

from dataclasses import dataclass
 

@dataclass
# 定义car类型
class Car:
    def __init__(self, make, model, year):
        self.make = make
        self.model = model
        self.year = year
        

def print_car(car):
    print(f"这是一个{car.year}年的{car.make} {car.model}。")

# 创建car对象
my_car = Car("宝马", "X5", 2021)

# 调用print_car函数打印car信息
print_car(my_car)